home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
OUTLINE.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-13
|
17KB
|
397 lines
//----------------------------------------------------------------------------
// Outline.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Outline.pas
//----------------------------------------------------------------------------
#ifndef OutlineHPP
#define OutlineHPP
//----------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Grids.hpp>
#include <StdCtrls.hpp>
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Outline
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) OutlineError;
class __declspec(pascalimplementation) OutlineError : public System::TObject
{
typedef System::TObject inherited;
public:
/* TObject.Create */ __fastcall OutlineError(void) : System::TObject() { }
/* TObject.Destroy */ __fastcall virtual ~OutlineError(void) { }
};
class __declspec(delphiclass) EOutlineError;
class __declspec(pascalimplementation) EOutlineError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EOutlineError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EOutlineError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EOutlineError(const System::AnsiString Msg, int AHelpContext)
: Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EOutlineError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args,
const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
{ }
public:
/* TObject.Destroy */ __fastcall virtual ~EOutlineError(void) { }
};
enum TOutlineNodeCompare { ocLess, ocSame, ocGreater, ocInvalid };
enum TAttachMode { oaAdd, oaAddChild, oaInsert };
typedef Shortint TChangeRange;
class __declspec(delphiclass) TOutlineNode;
class __declspec(delphiclass) TCustomOutline;
enum TOutlineBitmap { obPlus, obMinus, obOpen, obClose, obLeaf };
typedef Set<TOutlineBitmap, obPlus, obLeaf> TOutlineBitmaps;
typedef Graphics::TBitmap* TBitmapArray[5];
typedef void __fastcall (__closure *EOutlineChange)(System::TObject* Sender, long Index);
enum TOutlineStyle { osText, osPlusMinusText, osPictureText, osPlusMinusPictureText, osTreeText, osTreePictureText
};
enum TOutlineType { otStandard, otOwnerDraw };
enum TOutlineOption { ooDrawTreeRoot, ooDrawFocusRect, ooStretchBitmaps };
typedef Set<TOutlineOption, ooDrawTreeRoot, ooStretchBitmaps> TOutlineOptions;
class __declspec(pascalimplementation) TCustomOutline : public Grids::TCustomGrid
{
typedef Grids::TCustomGrid inherited;
private:
bool FBlockInsert;
TOutlineNode* FRootNode;
TOutlineNode* FGoodNode;
int UpdateCount;
TOutlineNode* FCurItem;
System::AnsiString FSeparator;
int FFontSize;
Classes::TStrings* FStrings;
TOutlineBitmaps FUserBitmaps;
TOutlineBitmaps FOldBitmaps;
Graphics::TBitmap* FPictures[5];
EOutlineChange FOnExpand;
EOutlineChange FOnCollapse;
TOutlineStyle FOutlineStyle;
Graphics::TColor FMaskColor;
int FItemHeight;
TOutlineType FStyle;
TOutlineOptions FOptions;
bool FIgnoreScrollResize;
TOutlineNode* FSelectedItem;
Stdctrls::TDrawItemEvent FOnDrawItem;
bool FSettingWidth;
bool FSettingHeight;
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
long __fastcall GetItemCount(void);
long __fastcall AttachNode(long Index, System::AnsiString Str, void * Ptr, TAttachMode AttachMode)
;
TOutlineNode* __fastcall Get(long Index);
long __fastcall GetSelectedItem(void);
void __fastcall SetSelectedItem(long Value);
TOutlineNodeCompare __fastcall CompareNodes(TOutlineNode* Value1, TOutlineNode* Value2);
void __fastcall Error(int ErrorStringID);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
bool __fastcall ResizeGrid(void);
void __fastcall DoExpand(TOutlineNode* Node);
void __fastcall Init(void);
void __fastcall MoveNode(long Destination, long Source, TAttachMode AttachMode);
void __fastcall ClearBitmap(Graphics::TBitmap* &Bitmap, TOutlineBitmap Kind);
void __fastcall ChangeBitmap(Graphics::TBitmap* Value, TOutlineBitmap Kind);
void __fastcall SetRowHeight(void);
void __fastcall SetCurItem(long Value);
void __fastcall CreateGlyph(void);
void __fastcall SetStrings(Classes::TStrings* Value);
Classes::TStrings* __fastcall GetStrings(void);
bool __fastcall IsCurItem(long Value);
void __fastcall SetPicture(int Index, Graphics::TBitmap* Value);
Graphics::TBitmap* __fastcall GetPicture(int Index);
void __fastcall DrawPictures(Graphics::TBitmap* const * BitMaps, const int BitMaps_Size, const Windows::TRect
&ARect);
void __fastcall DrawText(TOutlineNode* Node, const Windows::TRect &Rect);
void __fastcall SetOutlineStyle(TOutlineStyle Value);
void __fastcall DrawTree(const Windows::TRect &ARect, TOutlineNode* Node);
void __fastcall SetMaskColor(Graphics::TColor Value);
void __fastcall SetItemHeight(int Value);
void __fastcall SetStyle(TOutlineType Value);
void __fastcall SetOutlineOptions(TOutlineOptions Value);
bool __fastcall StoreBitmap(int Index);
void __fastcall ReadBinaryData(Classes::TStream* Stream);
void __fastcall WriteBinaryData(Classes::TStream* Stream);
void __fastcall SetHorzScrollBar(void);
void __fastcall ResetSelectedItem(void);
void __fastcall SetRowFromNode(TOutlineNode* Node);
protected:
virtual void __fastcall Loaded(void);
virtual void __fastcall Click(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
TOutlineNode* __fastcall SetGoodIndex(TOutlineNode* Value);
virtual void __fastcall DrawCell(long ACol, long ARow, const Windows::TRect &ARect, Grids::TGridDrawState
AState);
virtual void __fastcall DblClick(void);
void __fastcall SetLevel(TOutlineNode* Node, Cardinal CurLevel, Cardinal NewLevel);
bool __fastcall BadIndex(TOutlineNode* Value);
void __fastcall DeleteNode(TOutlineNode* Node, long CurIndex);
virtual void __fastcall Expand(long Index);
virtual void __fastcall Collapse(long Index);
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
void __fastcall Move(long Destination, long Source, TAttachMode AttachMode);
void __fastcall SetDisplayWidth(int Value);
__property Classes::TStrings* Lines = {read=GetStrings, write=SetStrings, nodefault};
__property TOutlineStyle OutlineStyle = {read=FOutlineStyle, write=SetOutlineStyle, default=5};
__property EOutlineChange OnExpand = {read=FOnExpand, write=FOnExpand};
__property EOutlineChange OnCollapse = {read=FOnCollapse, write=FOnCollapse};
__property TOutlineOptions Options = {read=FOptions, write=SetOutlineOptions, default=3};
__property TOutlineType Style = {read=FStyle, write=SetStyle, default=0};
__property int ItemHeight = {read=FItemHeight, write=SetItemHeight, nodefault};
__property Stdctrls::TDrawItemEvent OnDrawItem = {read=FOnDrawItem, write=FOnDrawItem};
__pr